import pymysql.cursors

# 连接数据库
def connect(dbname,user='root',password='123456'):
    connection = pymysql.connect(host='localhost',
    	user='root',
    	password='123456',
    	db=dbname,
    	charset='utf8mb4',
    	cursorclass=pymysql.cursors.DictCursor)
    return connection
